﻿using MongoDB.Bson;
using MongoDB.Bson.Serialization.Attributes;
using System;

namespace Sustainalytics.Entities.RiskRatings
{
    public class RiskRatingClusterBase
    {
        public Guid Id { get; set; }

        public double LowerBound { get; set; }
        public double UpperBound { get; set; }

        [BsonRepresentation(BsonType.String)] public RiskRatingClusterType Type { get; set; }
    }

    public class RiskRatingClusterBase<T> : RiskRatingClusterBase
    {
        [BsonRepresentation(BsonType.String)] public T Assessment { get; set; }
    }

    public class RiskRatingCluster : RiskRatingClusterBase<RiskRatingClusterAssessment>
    {
        public string Code { get; set; }
    }

    public class ManagementCluster : RiskRatingClusterBase<ManagementClusterAssessment> { }

    public class ManageableCluster : RiskRatingClusterBase<ManageableClusterAssessment> { }

    public class ExposureCluster : RiskRatingClusterBase<ExposureClusterAssessment> { }
}
